<<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <ui:composition>
    <h:form>
        <p:panel id="panel" header="Please enter your login+password" style="font-style: italic">  
        <h:panelGrid columns="3">  
            <p:outputLabel value="Login" />
            <p:inputText id="login" value="#{Login.login}" required="true"/>
            <p:message for="login" showSummary="true"/>

            <p:outputLabel value="Password" />
            <p:password id="password" value="#{Login.password}" />
            <p:message for="password" />
                
            <p:commandButton value="Login" type="button">
                <p:ajax event="click" update="@form" process="@form" listener="#{Login.doLogin()}" />
            </p:commandButton>
            <p:commandButton value="Register" type="button">
                <p:ajax event="click" update="@form" process="@form" listener="#{Login.doRegister()}" />
            </p:commandButton>
        </h:panelGrid>
        <p:messages showSummary="true" showDetail="true" closable="true"/>
        </p:panel>    
    </h:form>
    </ui:composition>
</html>
